package com.manage.competition.controller;

import com.manage.competition.common.ServerResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * Create with IDEA
 *
 * @Author: gitee.com/KamisamaXX
 * @Date: Create in 10:47 2019/3/23
 * @Description:
 */
@RestController
@RequestMapping("/")
public class CommonController {

    @RequestMapping("unauth")
    public ServerResponse<String> unauth(HttpServletResponse response) {
        response.setStatus(401);
        return ServerResponse.createByErrorCodeMessage(401,"未登录");
    }

    @RequestMapping("test")
    public ServerResponse<String> test(HttpServletResponse response) {
        response.setStatus(405);
        return ServerResponse.createByErrorCodeMessage(401,"上传失败");
    }
}
